]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Move focus ourselves when entering by keybinding
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 15 Sep 2012 21:01:56 +0000 (23:01 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 18 Sep 2012 16:45:42 +0000 (18:45 +0200)
When the tray is triggered by keybinding rather than dwelling, the
first summary item should be given key focus. Currently this is
achieved by grabbing the focus before toggling the tray, so that
the grabHelper will move the focus for us. However this interferes
with the grabHelper's focus save/restore mechanism - for instance,
after using the keybinding once, the tray will always come up with
the first item focused.

https://bugzilla.gnome.org/show_bug.cgi?id=682243

js/ui/messageTray.js

index 5a2e3d2665942a8d9c51824dff9f79bbdc19124f..30cb6a7e6b7332c72fd6e97286fd4f6740813ab5 100644 (file)
@@ -1715,10 +1715,8 @@ const MessageTray = new Lang.Class({
     },
 
     toggleAndNavigate: function() {
-        // Grab the key focus so that GrabHelper knows
-        // that we have the key grab.
-        this._summary.grab_key_focus();
         this.toggle();
+        this._summary.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
     },
 
     hide: function() {